package io.renren.modules.wmunnormal.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.wmunnormal.dao.WmunnormalDao;
import io.renren.modules.wmunnormal.entity.WmunnormalEntity;
import io.renren.modules.wmunnormal.service.WmunnormalService;


@Service("wmunnormalService")
public class WmunnormalServiceImpl extends ServiceImpl<WmunnormalDao, WmunnormalEntity> implements WmunnormalService {

    @Autowired
    WmunnormalDao wmunnormalDao;
    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<WmunnormalEntity> page = this.page(
                new Query<WmunnormalEntity>().getPage(params),
                new QueryWrapper<WmunnormalEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public List<WmunnormalEntity> getWm(String wmName, String startTime, String endTime) {
        return wmunnormalDao.getWm(wmName,startTime,endTime);
    }

}